<!DOCTYPE html>
<html>
<head>
    <title>登录 - 进销存系统</title>
    <meta charset="utf-8">
    <style>
        body { 
            font-family: Arial, sans-serif; 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0;
        }
        .login-container { 
            width: 400px; 
            padding: 40px; 
            background: white; 
            border-radius: 10px; 
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        .form-group { 
            margin-bottom: 20px; 
        }
        label { 
            display: block; 
            margin-bottom: 8px;
            font-weight: bold;
            color: #333;
        }
        input[type="text"], input[type="password"] { 
            width: 100%; 
            padding: 12px; 
            border: 2px solid #ddd; 
            border-radius: 5px; 
            font-size: 16px;
            transition: border-color 0.3s;
        }
        input[type="text"]:focus, input[type="password"]:focus {
            border-color: #667eea;
            outline: none;
        }
        button { 
            width: 100%; 
            padding: 12px; 
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white; 
            border: none; 
            border-radius: 5px; 
            cursor: pointer; 
            font-size: 16px;
            font-weight: bold;
        }
        button:hover {
            opacity: 0.9;
        }
        .error { 
            color: #e74c3c; 
            margin-bottom: 15px; 
            text-align: center;
            padding: 10px;
            background: #ffeaea;
            border-radius: 5px;
        }
        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
        }
    </style>
</head>
<body>
    <div class="login-container">
        <h2>进销存系统登录</h2>
        {{if .Error}}<div class="error">{{.Error}}</div>{{end}}
        <form method="post">
            <div class="form-group">
                <label>用户名:</label>
                <input type="text" name="username" value="admin" required>
            </div>
            <div class="form-group">
                <label>密码:</label>
                <input type="password" name="password" value="P@ssword" required>
            </div>
            <button type="submit">登录</button>
        </form>
    </div>
</body>
</html>